#include <bits/stdc++.h>
#include "testlib.h"

using namespace std;

int main(int argc, char* argv[]) {
    registerValidation(argc, argv);
    int group = atoi(validator.group().c_str());
    if (group == 0) group = 1;
    ensure (group == 1 || group == 2);
    int n;
    if (group == 1) {
        n = inf.readInt(3, 7, "N");
    } else {
        n = inf.readInt(3, 100, "N");
    } 
    inf.readEoln();
    inf.readInt(2*n-1, (n*n+1)/2, "K");
    inf.readEoln();
    inf.readEof();
}
